using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BlackHoleSkill : Skill
{
    [Header("BlackHole info")]
    [SerializeField]private GameObject blackHolePrefab;
    [SerializeField]private float expandSpeed = 10f;
    [SerializeField]private float maxSize = 15;
    [SerializeField]private float shrinkSpeed = 4f;
    [SerializeField]private float attackCoolDown = 0.5f;
    [SerializeField]private int attackAmounts = 4;
    [SerializeField]private float blackHoleDuration = 3f;

    public void CreateBlackHole()
    {
        GameObject blackHole = Instantiate(blackHolePrefab,player.transform);
        blackHole.transform.position = player.transform.position + new Vector3(0,1);
        blackHole.GetComponent<BlackHoleController>().SetBlackController(maxSize,expandSpeed,shrinkSpeed,attackCoolDown,attackAmounts,blackHoleDuration);

    }

    protected override void Update()
    {
        base.Update();
    }

    public override void UseSkill()
    {
        base.UseSkill();
        CreateBlackHole();
    }

   
}
